package com.itheima.homework2.demo3;

import java.util.Objects;

public class Goods {
    private String store;
    private String name;


    public Goods() {
    }

    public Goods(String store, String name) {
        this.store = store;
        this.name = name;
    }

    /**
     * 获取
     * @return store
     */
    public String getStore() {
        return store;
    }

    /**
     * 设置
     * @param store
     */
    public void setStore(String store) {
        this.store = store;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    public String toString() {
        return "Goods{store = " + store + ", name = " + name + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return Objects.equals(store, goods.store) && Objects.equals(name, goods.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(store, name);
    }
}
